package com.bo.day20231205;

/**
 * @Author: gpb
 * @Date: 2023/12/6 9:48
 * @Description:
 */
public class Client {
    public static void main (String[] args) {
//        int[][] arr = {{2,3},{3,4,5}};
//        System.out.println(arr.length);
//        System.out.println(arr[1][0]);
//        System.out.println(arr[1][1]);
//        System.out.println(arr[1][2]);

        HeapGreater<Inner<Integer>> heap = new HeapGreater<>((o1, o2) -> o2.value - o1.value);

        Inner<Integer> inner1 = new Inner<Integer>(3);
        Inner<Integer> inner2 = new Inner<Integer>(7);
        Inner<Integer> inner3 = new Inner<Integer>(3);
        Inner<Integer> inner4 = new Inner<Integer>(9);
        Inner<Integer> inner5 = new Inner<Integer>(5);
        Inner<Integer> inner6 = new Inner<Integer>(2);

        heap.push(inner1);
        heap.push(inner2);
        heap.push(inner3);
        heap.push(inner4);
        heap.push(inner5);
        heap.push(inner6);

        heap.remove(inner3);
        System.out.println(heap.pop().value);
        System.out.println(heap.pop().value);
        System.out.println(heap.pop().value);
        System.out.println(heap.pop().value);
        System.out.println(heap.pop().value);
    }
}
